package com.honey.mybatis.generator.entity;

import com.honey.core.dbmapping.introspect.IntrospectSchema;
import com.honey.core.dbmapping.introspect.IntrospectSchemaColumn;
import com.honey.core.types.FullyQualifiedJavaType;
import com.honey.core.types.JDKFullyQualifiedJavaType;
import com.honey.mybatis.generator.AbstractClass;
import com.honey.mybatis.generator.MybatisPlugin;

public class BlobEntityClass extends AbstractClass {
	
	public BlobEntityClass(MybatisPlugin belongPlugin,
			IntrospectSchema introspectSchema,
			IntrospectSchemaColumn introspectSchemaColumn) {
		super(belongPlugin, introspectSchema, introspectSchemaColumn);
	}
	
	@Override
	protected FullyQualifiedJavaType getType() {
		return super.getBlobEntityClassType(introspectSchema.getSchema());
	}

	@Override
	protected FullyQualifiedJavaType[] getImplements() {
		return new FullyQualifiedJavaType[]{
				mybatisPlugin.isEntitySerializable()?JDKFullyQualifiedJavaType.getSerializableInstance():null,
				//super.getEntityInterfaceType(null),
		};
	}

	/* (non-Javadoc)
	 * @see com.honey.mybatis.generator.AbstractClass#getSuperClass()
	 */
	@Override
	protected FullyQualifiedJavaType getSuperClass() {
		return super.getEntityPrimitiveClassType(introspectSchema.getSchema());
	}

	/* (non-Javadoc)
	 * @see com.honey.mybatis.generator.AbstractClass#getJavaDoc()
	 */
	@Override
	protected String[] getJavaDoc() {
		return new String[]{
				"分离大字段。",
		};
	}
}
